﻿<%@ WebHandler Language="C#" Class="VerifyCode" %>

using System;
using System.Web;
using System.Web.SessionState;

public class VerifyCode : IHttpHandler, IRequiresSessionState
{

    public void ProcessRequest(HttpContext context)
    {
        string code = VerifyCodeHelper.GenerateCheckCode();
        context.Session["vfycode"] = code;
        context.Response.ClearContent();
        context.Response.ContentType = "image/gif";
        context.Response.BinaryWrite(VerifyCodeHelper.CreateVerifyCode(code).ToArray());
    }

    public bool IsReusable
    {
        get
        {
            return false;
        }
    }

}